<?= form_open((isset ($action)&&$action)?$action:'',(isset ($attributes)&&$attributes)?$attributes:array(),(isset ($hidden)&&$hidden)?$hidden:'')?>
<table>
    <?php foreach ($data as $i => $v):?>
    <tr>
        <td class="form-label"><label><?= $v['label']?></label></td>
        <td class="form-input" cin="<?= $i?>">
            <?= $v['input']?>
            <?php if(isset ($v['type'])&&$v['type']=='file'){}?>
        </td>
    </tr>
    <?php endforeach; ?>
    <tr>
        <td colspan="2">
            <?= generate_input_element('save', array('type'=>'submit', 'value'=>'Submit')) ?>
            <?= generate_input_element('cancel',array('type'=>'button','value'=>'Cancel'))?>
        </td>
    </tr>
    
    <tr>
        <td colspan="2" style="border-top:solid grey 1px;">
            &nbsp;
        </td>
    </tr>
    
</table>
<?= form_close()?>
<?= (isset ($test)?$test:'')?>